----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  D:\Vicard\VV\re\inprogress\BRV\results\Table_A7.log
  log type:  text
 opened on:  29 Sep 2017, 19:37:02

. 
. /* time to ship */
. 
. use $Output\dataset_brv_fe, clear

. 
. keep if eu25 == 0 /*only on extra EU*/
(3,792,404 observations deleted)

. 
. drop if distsea_new == .
(2,169 observations deleted)

. egen large_distance = pctile(distsea_new), p(50)

. keep if distsea_new>large_distance
(1,644,742 observations deleted)

. 
. global condition  "entry_ele!=1994 & entry_ele!=1995"

. 
. foreach var in diff {
  2. 
.         eststo: reg dprior `var' age_ele1                                               if $condition, r cluster(i)
  3.         eststo: reg dprior `var' age_ele1 `var'_ele1                    if $condition, r cluster(i)
  4.         eststo: reg dprior `var'_ele1_* ele1_*                                  if $condition, r cluster(i)
  5. 
. }

Linear regression                               Number of obs     =    358,418
                                                F(2, 20729)       =     766.49
                                                Prob > F          =     0.0000
                                                R-squared         =     0.0380
                                                Root MSE          =     1.3644

                                 (Std. Err. adjusted for 20,730 clusters in i)
------------------------------------------------------------------------------
             |               Robust
      dprior |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
        diff |   .0718804   .0023049    31.19   0.000     .0673627    .0763981
    age_ele1 |  -.0291389    .001277   -22.82   0.000     -.031642   -.0266358
       _cons |   .1119839   .0049371    22.68   0.000     .1023068    .1216611
------------------------------------------------------------------------------
(est1 stored)

Linear regression                               Number of obs     =    358,418
                                                F(3, 20729)       =     740.57
                                                Prob > F          =     0.0000
                                                R-squared         =     0.0381
                                                Root MSE          =     1.3643

                                 (Std. Err. adjusted for 20,730 clusters in i)
------------------------------------------------------------------------------
             |               Robust
      dprior |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
        diff |   .0807854   .0031857    25.36   0.000     .0745412    .0870295
    age_ele1 |  -.0292419   .0012504   -23.39   0.000    -.0316928    -.026791
   diff_ele1 |   -.002904   .0011891    -2.44   0.015    -.0052347   -.0005733
       _cons |   .1119387   .0049309    22.70   0.000     .1022738    .1216036
------------------------------------------------------------------------------
(est2 stored)
note: diff_ele1_1 omitted because of collinearity
note: ele1_1 omitted because of collinearity
note: ele1_9 omitted because of collinearity

Linear regression                               Number of obs     =    358,418
                                                F(17, 20729)      =     151.33
                                                Prob > F          =     0.0000
                                                R-squared         =     0.0390
                                                Root MSE          =     1.3638

                                 (Std. Err. adjusted for 20,730 clusters in i)
------------------------------------------------------------------------------
             |               Robust
      dprior |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
 diff_ele1_1 |          0  (omitted)
 diff_ele1_2 |   .0753218   .0021477    35.07   0.000     .0711122    .0795315
 diff_ele1_3 |   .0714191   .0026307    27.15   0.000     .0662627    .0765755
 diff_ele1_4 |      .0675   .0035622    18.95   0.000     .0605178    .0744822
 diff_ele1_5 |   .0617855   .0051416    12.02   0.000     .0517077    .0718634
 diff_ele1_6 |    .068834    .004932    13.96   0.000     .0591669     .078501
 diff_ele1_7 |   .0677431   .0080556     8.41   0.000     .0519534    .0835327
 diff_ele1_8 |   .0617772    .009877     6.25   0.000     .0424175    .0811369
 diff_ele1_9 |   .0630574   .0134676     4.68   0.000     .0366598    .0894551
diff_ele1_10 |   .0398517   .0176604     2.26   0.024      .005236    .0744675
      ele1_1 |          0  (omitted)
      ele1_2 |   .1040968   .0220496     4.72   0.000     .0608778    .1473158
      ele1_3 |  -.0003591   .0223534    -0.02   0.987    -.0441734    .0434553
      ele1_4 |  -.0273319   .0225631    -1.21   0.226    -.0715573    .0168935
      ele1_5 |  -.0369049   .0235031    -1.57   0.116    -.0829728     .009163
      ele1_6 |  -.0395357   .0233764    -1.69   0.091    -.0853552    .0062837
      ele1_7 |   -.037675   .0251184    -1.50   0.134    -.0869091    .0115591
      ele1_8 |  -.0204021   .0281014    -0.73   0.468     -.075483    .0346789
      ele1_9 |          0  (omitted)
     ele1_10 |  -.0338253    .042147    -0.80   0.422    -.1164366    .0487861
       _cons |  -.0219559   .0217698    -1.01   0.313    -.0646264    .0207146
------------------------------------------------------------------------------
(est3 stored)

. 
. /* complex goods (Nunn) */
. 
. use "$Source\nunn_qje", clear

. keep isocode country_name industry_code industry_description frac_cons_diff frac_cons_not_homog  capital hs6 isic4_digit isic

. collapse (mean) frac_cons_diff frac_cons_not_homog capital, by(isic4_digit)

. rename isic isic

. sort   isic

. save "$Source\nunn_indexes", replace
file data\orig\nunn_indexes.dta saved

. 
. use "$Output\dataset_brv_fe", clear

. *
. rename prod hs6

. sort  hs6

. merge hs6 using "$Source\hs6_isic", nokeep
(note: you are using old merge syntax; see [D] merge for new syntax)
variable hs6 does not uniquely identify observations in the master data
(note: variable hs6 was float, now double to accommodate using data's values)

. tab  _merge

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |     37,749        0.53        0.53
          3 |  7,037,628       99.47      100.00
------------+-----------------------------------
      Total |  7,075,377      100.00

. drop _merge

. *
. sort  isic

. merge isic using "$Source\nunn_indexes", nokeep
(note: you are using old merge syntax; see [D] merge for new syntax)
variable isic does not uniquely identify observations in the master data

. tab  _merge

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |    452,788        6.40        6.40
          3 |  6,622,589       93.60      100.00
------------+-----------------------------------
      Total |  7,075,377      100.00

. drop _merge

. *
. drop if frac_cons_not_homog == .
(452,788 observations deleted)

. egen large_frac_cons_not_homog = pctile(frac_cons_not_homog), p(50)

. keep if frac_cons_not_homog>large_frac_cons_not_homog
(3,472,484 observations deleted)

. *
. global condition  "entry_ele!=1994 & entry_ele!=1995"

. *
. foreach var in diff {
  2. 
.         eststo: reg dprior `var' age_ele1                                               if $condition, r cluster(i)
  3.         eststo: reg dprior `var' age_ele1 `var'_ele1                    if $condition, r cluster(i)
  4.         eststo: reg dprior `var'_ele1_* ele1_*                                  if $condition, r cluster(i)
  5. }

Linear regression                               Number of obs     =    800,015
                                                F(2, 25404)       =    1201.40
                                                Prob > F          =     0.0000
                                                R-squared         =     0.0429
                                                Root MSE          =     1.2723

                                 (Std. Err. adjusted for 25,405 clusters in i)
------------------------------------------------------------------------------
             |               Robust
      dprior |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
        diff |   .0772989   .0018775    41.17   0.000     .0736189    .0809788
    age_ele1 |  -.0307697   .0010986   -28.01   0.000     -.032923   -.0286165
       _cons |   .1400334   .0038383    36.48   0.000     .1325101    .1475568
------------------------------------------------------------------------------
(est4 stored)

Linear regression                               Number of obs     =    800,015
                                                F(3, 25404)       =     822.59
                                                Prob > F          =     0.0000
                                                R-squared         =     0.0430
                                                Root MSE          =     1.2723

                                 (Std. Err. adjusted for 25,405 clusters in i)
------------------------------------------------------------------------------
             |               Robust
      dprior |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
        diff |   .0835889    .002572    32.50   0.000     .0785477    .0886302
    age_ele1 |   -.031028   .0010799   -28.73   0.000    -.0331446   -.0289114
   diff_ele1 |  -.0019724   .0005558    -3.55   0.000    -.0030619    -.000883
       _cons |   .1406533   .0038071    36.95   0.000     .1331912    .1481154
------------------------------------------------------------------------------
(est5 stored)
note: diff_ele1_1 omitted because of collinearity
note: ele1_1 omitted because of collinearity
note: ele1_9 omitted because of collinearity

Linear regression                               Number of obs     =    800,015
                                                F(17, 25404)      =     202.07
                                                Prob > F          =     0.0000
                                                R-squared         =     0.0443
                                                Root MSE          =     1.2714

                                 (Std. Err. adjusted for 25,405 clusters in i)
------------------------------------------------------------------------------
             |               Robust
      dprior |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
 diff_ele1_1 |          0  (omitted)
 diff_ele1_2 |   .0797448   .0019677    40.53   0.000     .0758879    .0836017
 diff_ele1_3 |   .0776307   .0024253    32.01   0.000      .072877    .0823844
 diff_ele1_4 |   .0747911   .0027046    27.65   0.000       .06949    .0800922
 diff_ele1_5 |   .0695202   .0043063    16.14   0.000     .0610796    .0779608
 diff_ele1_6 |   .0740406    .003629    20.40   0.000     .0669275    .0811538
 diff_ele1_7 |   .0710354   .0039358    18.05   0.000     .0633211    .0787498
 diff_ele1_8 |   .0719908   .0049859    14.44   0.000     .0622181    .0817635
 diff_ele1_9 |   .0646787   .0079107     8.18   0.000     .0491734     .080184
diff_ele1_10 |   .0793901   .0123151     6.45   0.000     .0552518    .1035284
      ele1_1 |          0  (omitted)
      ele1_2 |   .1388274   .0158043     8.78   0.000     .1078501    .1698047
      ele1_3 |   .0090948   .0156532     0.58   0.561    -.0215864    .0397759
      ele1_4 |  -.0109677   .0155141    -0.71   0.480    -.0413762    .0194407
      ele1_5 |  -.0205215   .0160052    -1.28   0.200    -.0518926    .0108495
      ele1_6 |  -.0214331   .0161335    -1.33   0.184    -.0530557    .0101895
      ele1_7 |     -.0216   .0156363    -1.38   0.167     -.052248    .0090481
      ele1_8 |  -.0319134   .0173974    -1.83   0.067    -.0660134    .0021866
      ele1_9 |          0  (omitted)
     ele1_10 |  -.0380487   .0241017    -1.58   0.114    -.0852893     .009192
       _cons |  -.0199719   .0154785    -1.29   0.197    -.0503107    .0103669
------------------------------------------------------------------------------
(est6 stored)

. 
. set linesize 250

. esttab, mtitles drop(_cons) b(%5.3f) se(%5.3f) compress r2 starlevels(c 0.1 b 0.05 a 0.01)  se 

----------------------------------------------------------------------------
                 (1)        (2)        (3)        (4)        (5)        (6) 
                est1       est2       est3       est4       est5       est6 
----------------------------------------------------------------------------
diff           0.072a     0.081a                0.077a     0.084a           
             (0.002)    (0.003)               (0.002)    (0.003)            

age_ele1      -0.029a    -0.029a               -0.031a    -0.031a           
             (0.001)    (0.001)               (0.001)    (0.001)            

diff_ele1                -0.003b                          -0.002a           
                        (0.001)                          (0.001)            

diff_el~_1                           0.000                            0.000 
                                       (.)                              (.) 

diff_ele~2                           0.075a                           0.080a
                                   (0.002)                          (0.002) 

diff_ele~3                           0.071a                           0.078a
                                   (0.003)                          (0.002) 

diff_ele~4                           0.068a                           0.075a
                                   (0.004)                          (0.003) 

diff_ele~5                           0.062a                           0.070a
                                   (0.005)                          (0.004) 

diff_ele~6                           0.069a                           0.074a
                                   (0.005)                          (0.004) 

diff_ele~7                           0.068a                           0.071a
                                   (0.008)                          (0.004) 

diff_ele~8                           0.062a                           0.072a
                                   (0.010)                          (0.005) 

diff_ele~9                           0.063a                           0.065a
                                   (0.013)                          (0.008) 

diff_el~10                           0.040b                           0.079a
                                   (0.018)                          (0.012) 

ele1_1                               0.000                            0.000 
                                       (.)                              (.) 

ele1_2                               0.104a                           0.139a
                                   (0.022)                          (0.016) 

ele1_3                              -0.000                            0.009 
                                   (0.022)                          (0.016) 

ele1_4                              -0.027                           -0.011 
                                   (0.023)                          (0.016) 

ele1_5                              -0.037                           -0.021 
                                   (0.024)                          (0.016) 

ele1_6                              -0.040c                          -0.021 
                                   (0.023)                          (0.016) 

ele1_7                              -0.038                           -0.022 
                                   (0.025)                          (0.016) 

ele1_8                              -0.020                           -0.032c
                                   (0.028)                          (0.017) 

ele1_9                               0.000                            0.000 
                                       (.)                              (.) 

ele1_10                             -0.034                           -0.038 
                                   (0.042)                          (0.024) 
----------------------------------------------------------------------------
N             358418     358418     358418     800015     800015     800015 
R-sq           0.038      0.038      0.039      0.043      0.043      0.044 
----------------------------------------------------------------------------
Standard errors in parentheses
c p<0.1, b p<0.05, a p<0.01

. esttab, mtitles drop(_cons) b(%5.3f) se(%5.3f) r2  starlevels({$^c$} 0.1 {$^b$} 0.05 {$^a$} 0.01) se tex label  title() 

{
\def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi}
\begin{tabular}{l*{6}{c}}
\hline\hline
                    &\multicolumn{1}{c}{(1)}&\multicolumn{1}{c}{(2)}&\multicolumn{1}{c}{(3)}&\multicolumn{1}{c}{(4)}&\multicolumn{1}{c}{(5)}&\multicolumn{1}{c}{(6)}\\
                    &\multicolumn{1}{c}{est1}&\multicolumn{1}{c}{est2}&\multicolumn{1}{c}{est3}&\multicolumn{1}{c}{est4}&\multicolumn{1}{c}{est5}&\multicolumn{1}{c}{est6}\\
\hline
$\widehat{a}\_{ijkt}-\varepsilon^q\_{ijk,t-1}$&       0.072{$^a$}&       0.081{$^a$}&                  &       0.077{$^a$}&       0.084{$^a$}&                  \\
                    &     (0.002)      &     (0.003)      &                  &     (0.002)      &     (0.003)      &                  \\
[1em]
Age$ \_{ijkt}$       &      -0.029{$^a$}&      -0.029{$^a$}&                  &      -0.031{$^a$}&      -0.031{$^a$}&                  \\
                    &     (0.001)      &     (0.001)      &                  &     (0.001)      &     (0.001)      &                  \\
[1em]
\hspace{1cm} $\times$ Age$ \_{ijkt}$&                  &      -0.003{$^b$}&                  &                  &      -0.002{$^a$}&                  \\
                    &                  &     (0.001)      &                  &                  &     (0.001)      &                  \\
[1em]
\hspace{1cm} $\times$ Age$ \_{ijkt}=1$&                  &                  &       0.000      &                  &                  &       0.000      \\
                    &                  &                  &         (.)      &                  &                  &         (.)      \\
[1em]
\hspace{1cm} $\times$ Age$ \_{ijkt}=2$&                  &                  &       0.075{$^a$}&                  &                  &       0.080{$^a$}\\
                    &                  &                  &     (0.002)      &                  &                  &     (0.002)      \\
[1em]
\hspace{1cm} $\times$ Age$ \_{ijkt}=3$&                  &                  &       0.071{$^a$}&                  &                  &       0.078{$^a$}\\
                    &                  &                  &     (0.003)      &                  &                  &     (0.002)      \\
[1em]
\hspace{1cm} $\times$ Age$ \_{ijkt}=4$&                  &                  &       0.068{$^a$}&                  &                  &       0.075{$^a$}\\
                    &                  &                  &     (0.004)      &                  &                  &     (0.003)      \\
[1em]
\hspace{1cm} $\times$ Age$ \_{ijkt}=5$&                  &                  &       0.062{$^a$}&                  &                  &       0.070{$^a$}\\
                    &                  &                  &     (0.005)      &                  &                  &     (0.004)      \\
[1em]
\hspace{1cm} $\times$ Age$ \_{ijkt}=6$&                  &                  &       0.069{$^a$}&                  &                  &       0.074{$^a$}\\
                    &                  &                  &     (0.005)      &                  &                  &     (0.004)      \\
[1em]
\hspace{1cm} $\times$ Age$ \_{ijkt}=7$&                  &                  &       0.068{$^a$}&                  &                  &       0.071{$^a$}\\
                    &                  &                  &     (0.008)      &                  &                  &     (0.004)      \\
[1em]
\hspace{1cm} $\times$ Age$ \_{ijkt}=8$&                  &                  &       0.062{$^a$}&                  &                  &       0.072{$^a$}\\
                    &                  &                  &     (0.010)      &                  &                  &     (0.005)      \\
[1em]
\hspace{1cm} $\times$ Age$ \_{ijkt}=9$&                  &                  &       0.063{$^a$}&                  &                  &       0.065{$^a$}\\
                    &                  &                  &     (0.013)      &                  &                  &     (0.008)      \\
[1em]
\hspace{1cm} $\times$ Age$ \_{ijkt}=10$&                  &                  &       0.040{$^b$}&                  &                  &       0.079{$^a$}\\
                    &                  &                  &     (0.018)      &                  &                  &     (0.012)      \\
[1em]
Age dummy, 1 years  &                  &                  &       0.000      &                  &                  &       0.000      \\
                    &                  &                  &         (.)      &                  &                  &         (.)      \\
[1em]
Age dummy, 2 years  &                  &                  &       0.104{$^a$}&                  &                  &       0.139{$^a$}\\
                    &                  &                  &     (0.022)      &                  &                  &     (0.016)      \\
[1em]
Age dummy, 3 years  &                  &                  &      -0.000      &                  &                  &       0.009      \\
                    &                  &                  &     (0.022)      &                  &                  &     (0.016)      \\
[1em]
Age dummy, 4 years  &                  &                  &      -0.027      &                  &                  &      -0.011      \\
                    &                  &                  &     (0.023)      &                  &                  &     (0.016)      \\
[1em]
Age dummy, 5 years  &                  &                  &      -0.037      &                  &                  &      -0.021      \\
                    &                  &                  &     (0.024)      &                  &                  &     (0.016)      \\
[1em]
Age dummy, 6 years  &                  &                  &      -0.040{$^c$}&                  &                  &      -0.021      \\
                    &                  &                  &     (0.023)      &                  &                  &     (0.016)      \\
[1em]
Age dummy, 7 years  &                  &                  &      -0.038      &                  &                  &      -0.022      \\
                    &                  &                  &     (0.025)      &                  &                  &     (0.016)      \\
[1em]
Age dummy, 8 years  &                  &                  &      -0.020      &                  &                  &      -0.032{$^c$}\\
                    &                  &                  &     (0.028)      &                  &                  &     (0.017)      \\
[1em]
Age dummy, 9 years  &                  &                  &       0.000      &                  &                  &       0.000      \\
                    &                  &                  &         (.)      &                  &                  &         (.)      \\
[1em]
Age dummy, 10 years &                  &                  &      -0.034      &                  &                  &      -0.038      \\
                    &                  &                  &     (0.042)      &                  &                  &     (0.024)      \\
\hline
Observations        &      358418      &      358418      &      358418      &      800015      &      800015      &      800015      \\
\(R^{2}\)           &       0.038      &       0.038      &       0.039      &       0.043      &       0.043      &       0.044      \\
\hline\hline
\multicolumn{7}{l}{\footnotesize Standard errors in parentheses}\\
\multicolumn{7}{l}{\footnotesize {$^c$} p<0.1, {$^b$} p<0.05, {$^a$} p<0.01}\\
\end{tabular}
}

. eststo clear

. 
. log close
      name:  <unnamed>
       log:  D:\Vicard\VV\re\inprogress\BRV\results\Table_A7.log
  log type:  text
 closed on:  29 Sep 2017, 19:38:01
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
